#pragma once

#include <QtWidgets/QMainWindow>
#include <QMap>

#include "ui_MainWindow.h"
#include "TreeModel.h"

class MainWindow : public QMainWindow
{
	Q_OBJECT

public:
	MainWindow(QWidget *parent = Q_NULLPTR);

protected:
	void connectActions();
	void addToDB(PointLabCore::Entity* entity);

protected:
	void doActionLoadFile();
	void doActionSaveFile();
	void doActionClose();

	void doActionBoundingBox();

	void doActionRandomSample();

	void doActionFullScreen();
	void doActionSetView();

	void doActionShowAboutDialog();
	void doActionShowHelpDialog();

protected:
	void updateUIWithSelection();
	PointLabCore::Entity* convertSelectNode(osg::Node* node);
protected:
	std::vector<osg::Node*> mSelectedEntities;

private:
	Ui::MainWindowClass ui;
	TreeModel* mRoot;

	QMap<osg::Node*, PointLabCore::Entity*> mNodeToEntityMaps;
};
